let menuData = [{
    dataTarget: 'MVC Edition vs. Web Edition',
    styleName: 'MVC Edition vs. Web Edition',
    subitems: [{
        title: 'Zoom In to the Feature the User Clicked',
        introduction: 'This sample show you how to find the feature at the point where the user clicked.',
        imgPath: './images/ZoomInToAFeatureClicked.jpg',
        htmlPath: '',
        jsPath: ''
    }, {
        title: 'Find Features Within a Distance',
        introduction: 'This sample is similar to the sample "Find The Feature The User Clicked On". Here, instead of just showing information about the selected feature, we will instead highlight the feature and the extent of the map will be set to the bounding box of that feature. Just click on a country and the map will zoom in to it.',
        imgPath: './images/ZoomInToAFeatureClicked.jpg',
        htmlPath: '',
        jsPath: ''
    }, {
        title: 'Vehicle Tracking',
        introduction: 'This sample is similar to the sample "Find The Feature The User Clicked On". Here, instead of just showing information about the selected feature, we will instead highlight the feature and the extent of the map will be set to the bounding box of that feature. Just click on a country and the map will zoom in to it.',
        imgPath: './images/ZoomInToAFeatureClicked.jpg',
        htmlPath: '',
        jsPath: ''
    }, {
        title: 'Interact With Map',
        introduction: 'This sample is similar to the sample "Find The Feature The User Clicked On". Here, instead of just showing information about the selected feature, we will instead highlight the feature and the extent of the map will be set to the bounding box of that feature. Just click on a country and the map will zoom in to it.',
        imgPath: './images/ZoomInToAFeatureClicked.jpg',

        htmlPath: '',
        jsPath: ''
    }, ]
}, {
    dataTarget: 'Background Maps (Google, Bing, etc)',
    styleName: 'Background Maps (Google, Bing, etc)',
    subitems: [{
        title: 'Display a Simple Map',
        introduction: 'This sample show you how to find the feature at the point where the user clicked.',
        imgPath: './images/ZoomInToAFeatureClicked.jpg',
        htmlPath: '',
        jsPath: ''
    }, {
        title: 'Zoom In to the Feature the User Clicked',
        introduction: 'This sample show you how to find the feature at the point where the user clicked.',
        imgPath: './images/ZoomInToAFeatureClicked.jpg',
        htmlPath: '',
        jsPath: ''
    }, {
        title: 'Zoom In to the Feature the User Clicked',
        introduction: 'This sample show you how to find the feature at the point where the user clicked.',
        imgPath: './images/ZoomInToAFeatureClicked.jpg',
        htmlPath: '',
        jsPath: ''
    }, {
        title: 'Zoom In to the Feature the User Clicked',
        introduction: 'This sample show you how to find the feature at the point where the user clicked.',
        imgPath: './images/ZoomInToAFeatureClicked.jpg',
        htmlPath: '',
        jsPath: ''
    }, ]
}, {
    dataTarget: 'Set Image Format and Quality',
    styleName: 'Set Image Format and Quality',
    subitems: [{
        title: 'Set Image Format and Quality',

        introduction: 'This sample show you how to find the feature at the point where the user clicked.',
        imgPath: './images/ZoomInToAFeatureClicked.jpg',
        htmlPath: '',
        jsPath: ''
    }, {
        title: 'Zoom In to the Feature the User Clicked',

        introduction: 'This sample show you how to find the feature at the point where the user clicked.',
        imgPath: './images/ZoomInToAFeatureClicked.jpg',
        htmlPath: '',
        jsPath: ''
    }, {
        title: 'Zoom In to the Feature the User Clicked',
        introduction: 'This sample show you how to find the feature at the point where the user clicked.',
        imgPath: './images/ZoomInToAFeatureClicked.jpg',
        htmlPath: '',
        jsPath: ''
    }, {
        title: 'Zoom In to the Feature the User Clicked',
        introduction: 'This sample show you how to find the feature at the point where the user clicked.',
        imgPath: './images/ZoomInToAFeatureClicked.jpg',
        htmlPath: '',
        jsPath: ''
    }, ]
}, {
    dataTarget: 'Labeling',
    styleName: 'Labeling',
    subitems: [{
        title: 'Label Nice Looking Roads',
        introduction: 'This sample show you how to find the feature at the point where the user clicked.',
        imgPath: './images/ZoomInToAFeatureClicked.jpg',
        htmlPath: '',
        jsPath: ''
    }, {
        title: 'Label Nice Looking Roads',
        introduction: 'This sample show you how to find the feature at the point where the user clicked.',
        imgPath: './images/ZoomInToAFeatureClicked.jpg',
        htmlPath: '',
        jsPath: ''
    }, {
        title: 'Label Nice Looking Roads',
        introduction: 'This sample show you how to find the feature at the point where the user clicked.',
        imgPath: './images/ZoomInToAFeatureClicked.jpg',
        htmlPath: '',
        jsPath: ''
    }, {
        title: 'Label Nice Looking Roads',
        introduction: 'This sample show you how to find the feature at the point where the user clicked.',
        imgPath: './images/ZoomInToAFeatureClicked.jpg',
        htmlPath: '',
        jsPath: ''
    }, ]
}, {
    dataTarget: 'Layers & FeatureSources',
    styleName: 'Layers & FeatureSources',
    subitems: [{
        title: 'Label Nice Looking Roads',
        introduction: 'This sample show you how to find the feature at the point where the user clicked.',
        imgPath: './images/ZoomInToAFeatureClicked.jpg',
        htmlPath: '',
        jsPath: ''
    }, {
        title: 'Find Features Within a Distance',
        introduction: 'This sample show you how to find the feature at the point where the user clicked.',
        imgPath: './images/ZoomInToAFeatureClicked.jpg',
        htmlPath: '',
        jsPath: ''
    }, {
        title: 'Vehicle Tracking',
        introduction: 'This sample show you how to find the feature at the point where the user clicked.',
        imgPath: './images/ZoomInToAFeatureClicked.jpg',
        htmlPath: '',
        jsPath: ''
    }, {
        title: 'Zoom In to the Feature the User Clicked',
        introduction: 'This sample show you how to find the feature at the point where the user clicked.',
        imgPath: './images/ZoomInToAFeatureClicked.jpg',
        htmlPath: '',
        jsPath: ''
    }, ]
}, {
    dataTarget: 'Miscellaneous',
    styleName: 'Miscellaneous',
    subitems: [{
        title: 'Zoom In to the Feature the User Clicked',
        introduction: 'This sample show you how to find the feature at the point where the user clicked.',
        imgPath: './images/ZoomInToAFeatureClicked.jpg',
        htmlPath: '',
        jsPath: ''
    }, {
        title: 'Zoom In to the Feature the User Clicked',
        introduction: 'This sample show you how to find the feature at the point where the user clicked.',
        imgPath: './images/ZoomInToAFeatureClicked.jpg',
        htmlPath: '',
        jsPath: ''
    }, {
        title: 'Zoom In to the Feature the User Clicked',
        introduction: 'This sample show you how to find the feature at the point where the user clicked.',
        imgPath: './images/ZoomInToAFeatureClicked.jpg',
        htmlPath: '',
        jsPath: ''
    }, {
        title: 'Zoom In to the Feature the User Clicked',
        introduction: 'This sample show you how to find the feature at the point where the user clicked.',
        imgPath: './images/ZoomInToAFeatureClicked.jpg',
        htmlPath: '',
        jsPath: ''
    }, ]
}, {
    dataTarget: 'Miscellaneous',
    styleName: 'Miscellaneous',
    subitems: [{
        title: 'Zoom In to the Feature the User Clicked',
        introduction: 'This sample show you how to find the feature at the point where the user clicked.',
        imgPath: './images/ZoomInToAFeatureClicked.jpg',
        htmlPath: '',
        jsPath: ''
    }, {
        title: 'Zoom In to the Feature the User Clicked',
        introduction: 'This sample show you how to find the feature at the point where the user clicked.',
        imgPath: './images/ZoomInToAFeatureClicked.jpg',
        htmlPath: '',
        jsPath: ''
    }, {
        title: 'Zoom In to the Feature the User Clicked',
        introduction: 'This sample show you how to find the feature at the point where the user clicked.',
        imgPath: './images/ZoomInToAFeatureClicked.jpg',
        htmlPath: '',
        jsPath: ''
    }, {
        title: 'Zoom In to the Feature the User Clicked',
        introduction: 'This sample show you how to find the feature at the point where the user clicked.',
        imgPath: './images/ZoomInToAFeatureClicked.jpg',
        htmlPath: '',
        jsPath: ''
    }, ]
}, {
    dataTarget: 'Printing',
    styleName: 'Printing',
    subitems: [{
        title: 'Zoom In to the Feature the User Clicked',
        introduction: 'This sample show you how to find the feature at the point where the user clicked.',
        imgPath: './images/ZoomInToAFeatureClicked.jpg',
        htmlPath: '',
        jsPath: ''
    }, {
        title: 'Zoom In to the Feature the User Clicked',
        introduction: 'This sample show you how to find the feature at the point where the user clicked.',
        imgPath: './images/ZoomInToAFeatureClicked.jpg',
        htmlPath: '',
        jsPath: ''
    }, {
        title: 'Zoom In to the Feature the User Clicked',
        introduction: 'This sample show you how to find the feature at the point where the user clicked.',
        imgPath: './images/ZoomInToAFeatureClicked.jpg',
        htmlPath: '',
        jsPath: ''
    }, {
        title: 'Zoom In to the Feature the User Clicked',
        introduction: 'This sample show you how to find the feature at the point where the user clicked.',
        imgPath: './images/ZoomInToAFeatureClicked.jpg',
        htmlPath: '',
        jsPath: ''
    }, ]
}, {
    dataTarget: 'Projection',
    styleName: 'Projection',
    subitems: [{
        title: 'Zoom In to the Feature the User Clicked',
        introduction: 'This sample show you how to find the feature at the point where the user clicked.',
        imgPath: './images/ZoomInToAFeatureClicked.jpg',
        htmlPath: '',
        jsPath: ''
    }, {
        title: 'Zoom In to the Feature the User Clicked',
        introduction: 'This sample show you how to find the feature at the point where the user clicked.',
        imgPath: './images/ZoomInToAFeatureClicked.jpg',
        htmlPath: '',
        jsPath: ''
    }, {
        title: 'Zoom In to the Feature the User Clicked',
        introduction: 'This sample show you how to find the feature at the point where the user clicked.',
        imgPath: './images/ZoomInToAFeatureClicked.jpg',
        htmlPath: '',
        jsPath: ''
    }, {
        title: 'Zoom In to the Feature the User Clicked',
        introduction: 'This sample show you how to find the feature at the point where the user clicked.',
        imgPath: './images/ZoomInToAFeatureClicked.jpg',
        htmlPath: '',
        jsPath: ''
    }, ]
}, {
    dataTarget: 'Spatial Functions',
    styleName: 'Spatial Functions',
    id: 10,
    subitems: [{
        title: 'Zoom In to the Feature the User Clicked',
        introduction: 'This sample show you how to find the feature at the point where the user clicked.',
        imgPath: './images/ZoomInToAFeatureClicked.jpg',
        htmlPath: '',
        jsPath: ''
    }, {
        title: 'Zoom In to the Feature the User Clicked',
        introduction: 'This sample show you how to find the feature at the point where the user clicked.',
        imgPath: './images/ZoomInToAFeatureClicked.jpg',
        htmlPath: '',
        jsPath: ''
    }, {
        title: 'Zoom In to the Feature the User Clicked',
        introduction: 'This sample show you how to find the feature at the point where the user clicked.',
        imgPath: './images/ZoomInToAFeatureClicked.jpg',
        htmlPath: '',
        jsPath: ''
    }, {
        title: 'Zoom In to the Feature the User Clicked',
        introduction: 'This sample show you how to find the feature at the point where the user clicked.',
        imgPath: './images/ZoomInToAFeatureClicked.jpg',
        htmlPath: '',
        jsPath: ''
    }, ]
}]


const utils = (data, keyName) => {
    let menuDataMap = new Map();
    for (let obj of data) {
        menuDataMap.get(obj[keyName]) || menuDataMap.set(obj[keyName], obj);
    }
    let newData = [];
    for (let [key, value] of menuDataMap) {
        newData.push(value);
    }
    return newData;
}
menuData = utils(menuData, 'dataTarget');
if (menuData.length > 0) {
    for (let obj of menuData) {
        obj['subitems'] = utils(obj['subitems'], 'title');
    }
}
export default menuData;